aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/invoice/[id]/memo/+page.server.ts
blob: 24dec1afcf6c4552988f1da4afb886122a9ac904 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import invoice from "$lib/invoice";
import { redirect } from "@sveltejs/kit";

export async function load({ parent, params }) {
  let { invoice } = await parent();
  if (!invoice.amount) {
    redirect(307, `/invoice/${invoice.id}`);
  }
}

export const actions = {
  default: invoice,
};